home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Clinical Endocrinology
/
Clinical Endocrinology.iso
/
pc
/
00000000
/
26000000
/
shared.dir
/
00912_Script_912
< prev
next >
Wrap
Text File
|
1995-11-17
|
3KB
|
99 lines
-- This handler is just called to puppet the text so that it can be
-- flicked thru by the slider
on puppetTextOn
global textChannel
puppetSprite textChannel, true
end puppetTextOn
-------------------------------------------------
-- This handler is the opposite of the above.
on puppetTextOff
global textChannel
puppetSprite textChannel, false
end puppetTextOff
-------------------------------------------------
-- This handler takes the values stored by "init" in globals
-- and calculates the pages proportionally along the slider
-- track. It moves the slider along and updates the page count
-- and flicks thru the text.
on moveSlider
global firstPage, lastPage, numOfPages, theLeft, theRight
global targetPage, Slider, slideNum, pageRange
global textChannel, numberAlign
cursor 200 -- blank cursor
puppetTextOn
hyperTextOff
repeat while the stillDown
set the locH of sprite Slider to the mouseH
set the locH of sprite slideNum to ┬
( the locH of sprite Slider ) - numberAlign
put the locH of sprite Slider - theLeft into currentPos
if currentPos < 1 then set currentPos = 1
put float( numOfPages / PageRange ) into vIncrement
put integer((( the locH of sprite Slider - theLeft )┬
* vIncrement) + 1) into targetPage
put targetPage & "/" & integer( numOfPages + 1 ) into field "Readout"
set the castNum of sprite textChannel = ( firstPage + targetPage ) - 1
updateStage
end repeat
go label( string(targetPage) )
puppetTextOff
hyperTextOn
cursor -1 -- pointer cursor
end moveSlider
------------------------------------------------
-- This handler calculates where to set the slider on the track
-- and which page to skip to when the arrows are clicked.
on calcSlider
global firstPage, lastPage, numOfPages, theLeft, theRight
global targetPage, Slider, slideNum, pageRange
global textChannel, numberAlign
put PageRange / numOfPages into pageSteps
set targetPage = value( the frameLabel)
set the locH of sprite Slider = (theLeft + ( targetPage * pageSteps )) - pageSteps
set the locH of sprite slideNum to ( the locH of sprite Slider ) - numberAlign
put targetPage & "/" & integer( numOfPages + 1 ) into field "Readout"
end calcSlider
------------------------------------------------
-- Handler which hides the hypertext while a page flick
-- is in progress.
on hyperTextOn
repeat with i = 39 to 45
set the visible of sprite i to true
end repeat
end hyperTextOn
------------------------------------------------
on hyperTextOff
repeat with i = 39 to 45
set the visible of sprite i to false
end repeat
end hyperTextOff
------------------------------------------------